using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class CameraMove : MonoBehaviour
{

    public Transform targetPlayer;
    private Vector3 pos;
    public float H = 10;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    private void LateUpdate()
    {
        if (targetPlayer == null) {
            return;
        }
        pos.x = targetPlayer.position.x;
        pos.y = H;
        pos.z = targetPlayer.position.z;
        transform.position = pos;
    }
}
